/*
 * @Author: YuanSong 
 * @Date: 2022-01-18 22:12:00 
 * @Last Modified by: YuanSong
 * @Last Modified time: 2022-01-19 14:50:09
 */
//用来实现数据库表的映射
const Sequelize = require('sequelize');
const db = require('../db');

//定义model
const Movie = db.define('Movie',{
    id:{type:Sequelize.INTEGER,primaryKey:true,allowNull:false,autoIncrement:true},//主键
    movie_title:{type:Sequelize.STRING(255)}, // 电影名称
    movie_url:{type:Sequelize.STRING(255)}, // 电影地址
    movie_cover:{type:Sequelize.STRING(255)}, // 电影封面
    movie_directory:{type:Sequelize.STRING(255)}, // 电影目录
    movie_type:{type:Sequelize.STRING(255)}, // 电影文件类型
},{
    underscored:true, //是否支持驼峰
    tableName: 'movie', //MySQL数据库表名
});
module.exports = Movie;